class App extends React.Component {
    render = function () {


        return (
            <div>
                <h2>Hello Worddddld!</h2>
                <button id="button1" onClick={this.handClick}>hello</button>
            </div>
        )
    }
    handClick = function () {
        alert("click handClick");
        $("#button1").text("blue");

        TestWebUploader.Uploader1.testfun(130, 239);
    }
};

class App1 extends React.Component {
    render = function () {


        return (
            <div>
                <h2>Hello Wor22222222ddddld!</h2>
                <button id="button1" onClick={this.handClick}>hello</button>
            </div>
        )
    }
    handClick = function () {
        alert("click handClick");
        $("#button1").text("blue");

        TestWebUploader.Uploader1.testfun(130, 239);
    }
};


class Toggle2 extends React.Component {
    constructor(props) {
        super(props);
        this.state = {isToggleOn: true};

        // 这边绑定是必要的，这样 `this` 才能在回调函数中使用
        this.handleClick = this.handleClick.bind(this);
    }

    handleClick() {
        this.setState(prevState => ({
            isToggleOn: !prevState.isToggleOn
        }));
    }

    render() {
        return (
            <div>

                <button onClick={this.handleClick}>
                    {this.state.isToggleOn ? 'ON' : 'OFF'}
                </button>
            </div>
        );
    }
}

var ta = new Toggle2();

class Toggle extends React.Component {
    constructor(props) {
        super(props);
        this.state = {isToggleOn: true, Toggle2: 5};

        // 这边绑定是必要的，这样 `this` 才能在回调函数中使用
        this.handleClick = this.handleClick.bind(this);
    }

    handleClick() {
        this.setState(prevState => ({
            isToggleOn: !prevState.isToggleOn
        }));
    }

    render() {
        const operations = [];
        operations.push(<div>ddddd</div>);
        operations.push(<div>ddddd2</div>);
        operations.push(<div>dddddwww2</div>);
        var v = ["hello"];
        return (
            <div>

                <div>{v[0]}</div>
                {operations}
                <div>{(this.state.Toggle2)}</div>
                <Toggle2/>
                <button onClick={this.handleClick}>
                    {this.state.isToggleOn ? 'ON' : 'OFF'}
                </button>
            </div>
        );
    }
}

class Hello extends React.Component {
    render() {
        var list = function (da, vv) {


            var res = [];


            for (var i in da) {
                res.push(<h2>{da[i]}</h2>)

            }

            for (var i in vv) {
                res.push(<h2>{vv[i]}</h2>)

            }


            return res
        }
        return (
            <div>hello {list(data, vvv)}
            </div>
        )
    }
}






